Skip to content

GABA AssetsController integration - #131

Merged
estebanmino merged 8 commits into
masterfrom
gaba-assets-controller-integration
Sep 21, 2018
Merged

estebanmino merged 8 commits into
masterfrom
gaba-assets-controller-integration

Conversation

@estebanmino

@estebanmino estebanmino commented Sep 12, 2018 •

Copy link
Copy Markdown
Contributor

Description

This PR adds support for collectibles, according to AssetsController on GABA.

UPDATE: After MetaMask/core#18 branch update, assets per account and network.

pernetworkaccount

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

Issue

Resolves #???

BLOCKER: eth-contract-metadata is not the official, we should decide what to do with collectibles metadata before merge.

Related MetaMask/core#18

@estebanmino estebanmino changed the title GABA AssetsController integration [WIP] GABA AssetsController integration Sep 13, 2018
@estebanmino

Copy link
Copy Markdown
Contributor Author

since MetaMask/core#18 landed, this needs to have the updated GABA version to be good to go.

@estebanmino estebanmino changed the title [WIP] GABA AssetsController integration GABA AssetsController integration Sep 19, 2018

@brunobar79 brunobar79 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff 👍!

Just a few minor comments here. I'll defer to @bitpshr the decision of if / when / how to merge because of the GABA blockers

Comment thread app/components/AddAsset/index.js Outdated
} = this.props;

return (
<View style={styles.wrapper} testID={'add-asset-screen'}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd call params something more descriptive and also change the testID to add-${assetType}-screen

Comment thread app/components/AddAsset/index.js Outdated
/>
</ScrollableTabView>
) : (
<AddCustomCollectible navigation={navigation} testID={'add-cutom-collectible'} />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "add-custom-collectible"

Comment thread app/components/Collectibles/index.js Outdated
<Image source={{ uri: asset.logo }} style={styles.itemLogo} />
<TouchableOpacity style={styles.itemWrapper} key={`asset-${asset.tokenId}`}>
<View style={styles.imageWrapper}>
{asset.image ? (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to move this logic into a CollectibleImage component.

@estebanmino

Copy link
Copy Markdown
Contributor Author

@bitpshr @brunobar79 from this comment I decomposed the tokens and collectibles list into assets element and assets image components, let me know what you think.

@brunobar79

Copy link
Copy Markdown
Contributor

@estebanmino Looks much better. Thanks! BTW, looks like you need to pass assetType in the tests of this component: MetaMask/website@5145f83#diff-d0a7b42290800dcd24c96726b89b4b80R11

@estebanmino

Copy link
Copy Markdown
Contributor Author

DIdn't notice it, thanks. I'll merge it when tests are ready!

@estebanmino
estebanmino merged commit 7059fd6 into master Sep 21, 2018
@estebanmino
estebanmino deleted the gaba-assets-controller-integration branch September 21, 2018 17:11
rickycodes pushed a commit that referenced this pull request Jan 31, 2022
* Wallet tokens from AssetsController

* Update some snapshots failing

* wallet collectibles support

* update GABA version

* update tests on AssetsController

* Assets components decomposition

* AddAsset add assetType to snapshot test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants